package com.thinkinjava.exception;

/**
 * 异常学习
 * 
 * @Description: TODO
 * @author guohao
 * @version Jun 22, 2012 12:06:34 AM
 */
public class WhoCall {

	static void f() {
		try {
			throw new Exception();
		} catch (Exception e) {
			for (StackTraceElement ste : e.getStackTrace())
				System.out.println(ste.getMethodName());

		}
	}

	static void g() {
		f();
	}

	static void h() {
		g();
	}

	public static void main(String[] args) {
		f();
		System.out.println("------------------------------");
		g();
		System.out.println("------------------------------");
		h();
	}

}
